package lcr;

public class Test0092 {
}

class Solution0092_1 {
    public int minFlipsMonoIncr(String s) {
        char[] chars = s.toCharArray();
        int c0=0,c1=0;

        for (char c : chars) {
            c1=Math.min(c0,c1);
            if (c=='1') c0++;
            else c1++;
        }

        return Math.min(c0,c1);
    }
}
